package xyz.larkin.common.api;

import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.data.Stat;

import java.util.List;

/**
 * Created by liujin on 2018/12/27.
 *
 * @description TODO
 */

public interface ZkService {
    String createNode(String nodePath, String data) throws KeeperException, InterruptedException;
    List<String> getChildrenList(String path) throws KeeperException, InterruptedException;
    String getData(String path) throws KeeperException, InterruptedException;
    Stat setData(String path, String data) throws KeeperException, InterruptedException;
    void deleteNode(String path) throws KeeperException, InterruptedException;
}
